﻿using System.IO;
using System.Text;

namespace AMing.Helper.WindowsPhone8
{
    public class JsonHelper
    {
        /// <summary>
        /// 序列化Json
        /// </summary>
        /// <param name="myMusicList"></param>
        /// <returns></returns>
        public static string Serialize(object value)
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(value);
        }

        /// <summary>
        /// 反序列化Json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public static T Deserialize<T>(string value)
        {
            return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(value);
        }

    }
}
